package com.longteng.diamond.factory;

import com.longteng.diamond.constant.InterfaceType;
import com.longteng.diamond.process.ClientProcesstor;
import com.longteng.diamond.process.HttpProcesstor;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator
 * DATE : 2018/7/18
 * TIME : 22:33
 * PROJECT : java-lesson
 * PACKAGE : com.longteng.lesson
 *
 * @author <a href="mailto:taki@qq.com">Administrator</a>
 */
@Component
public class ClientFactory {

    public ClientProcesstor getClient(String type){
        ClientProcesstor clientProcesstor=null;
        if(type.equalsIgnoreCase(InterfaceType.HTTP)){
            clientProcesstor=new HttpProcesstor();
        }else if(type.equalsIgnoreCase(InterfaceType.DUBBO)){

        }else if(type.equalsIgnoreCase(InterfaceType.WEBSERVICE)){

        }else if(type.equalsIgnoreCase(InterfaceType.RESTFUL)){

        }
        return clientProcesstor;
    }
}
